<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>围观界面</title>
</head>
<body>
<img id="recive" src="" style="width:100%;height:100%;">
</body>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
var socket = new WebSocket('ws://192.168.0.128:8080/live/show');
var image = document.getElementById('recive');
var vConsole = new window.VConsole();
console.log(image);
socket.onmessage = function(evt) {
	image.src = evt.data;
}
socket.onerror = function(evt) {
	console.log("err");
}
socket.onopen = function (evt) {
	console.log("open", evt);
}
socket.onclose = function (evt) {
	console.log("close", evt.code, evt.reason);
}
</script>
</html>